package logic

import (
	"context"
	"video-hub/models/mysql"

	"video-hub/videorpc/internal/svc"
	"video-hub/videorpc/videorpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CollectListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCollectListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CollectListLogic {
	return &CollectListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 收藏列表查询
func (l *CollectListLogic) CollectList(in *videorpc.CollectListRequest) (*videorpc.CollectListResponse, error) {
	// todo: add your logic here and delete this line

	var list []*videorpc.CollectList
	list = mysql.CollectList(mysql.DB, in)
	return &videorpc.CollectListResponse{
		List: list,
	}, nil
}
